import React, {Component} from  'react';

import './index.scss';
import { NAV } from 'config/config'; //nav data from config

import NavItemCon from './NavItemCon';

class SideBarCon extends Component {
  render () {
    const { curIdx, onNavItemClick } = this.props;

    return (
      <aside className="side-bar">
        {
          NAV.map((item, index) => {
            return (
              <NavItemCon 
                dataItem = { item}
                index = { index}
                key = { index}
                curIdx = { curIdx}
                onNavItemClick = { onNavItemClick }
              />
            )
          })
        }
      </aside>
    )
  }
}

export default SideBarCon;